<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8" />

<link rel="stylesheet" type="text/css" href="../css/header.css">
<link rel="stylesheet" type="text/css" href="../css/footer.css">
<link rel="stylesheet" type="text/css" href="../css/contest.css">
<link rel="stylesheet" type="text/css" href="../css/apply.css">
<link rel="stylesheet" type="text/css" href="../css/notice_board.css">

<link rel="stylesheet" href="../res/bootstrap/css/bootstrap.min.css">
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.1.js"></script>
<script
	src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.4/jquery-ui.js"></script>
<script
	src="//netdna.bootstrapcdn.com/bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script
	src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.21/angular.min.js"></script>
<script type="text/javascript" src="../se2/js/HuskyEZCreator.js"></script>
<script src="../myUtil.js"></script>
<script type="text/javascript" src="../js/contest.js"></script>
<script>
	$(function() {
		$(".header").load("header.html");
		$(".footer").load("footer.html");
	});
</script>

</head>
<body ng-app="myModule">
	<div class="container" ng-controller="MyController">
		<!-- header-->
		<div class="header span12"></div>
		<!--contest_nav-->
		<div class="contest_nav span3">


			<ul class="nav nav-pills nav-stacked">
				<li ng-repeat="item in liItems" ng-click="select(item)"
					ng-class="{active: isActive(item)}"><a>{{item.name}}</a></li>
			</ul>

		</div>
		<!--//contest_nav-->
		<!--contest-->
		<!--contest_all-->
		<div class="span8">
			<h2>{{contest_reg.name+contest_reg.count+"회차"}}</h2>
			<i class="icon-info-sign"></i><span class="info">{{selectedLi.notice}}</span><br />

			{{join && user.authority=='ROLE_STUDENT' ? "팀선택" : ""}} <select
				ng-model="team_id"
				ng-options="item.team_id as item.team_name for item in team"
				ng-if="join && user.authority=='ROLE_STUDENT'"
				ng-change="teamChange(team_id)">
			</select>

		</div>
		<!--팀선택-->
		<!--contest_all-->
		<!--자료제출 및 공지-->
		<div id="contest_board" class="contest_all span9"
			ng-if="selectedLi.href=='#contest_board' && !content_id">
			<table class="table table-hover">
				<thead>
					<tr>
						<td>번호</td>
						<td>타입</td>
						<td>제목</td>
						<td>작성자</td>
						<td>제출여부</td>
						<td>날짜</td>
					</tr>
				</thead>

				<tbody>

					<tr ng-repeat="item in currentPageitems"
						ng-click="contest_board_board(item.content_id)">
						<td>{{item.rownum}}</td>
						<td>{{item.notice==1 ? "[공지]" : "[제출]"}}</td>
						<td>{{item.title}}</td>
						<td>{{item.name}}</td>
						<td></td>
						<td>{{item.shortdate}}</td>
					</tr>
				</tbody>

			</table>
			<div ng-if="currentPageitems.length==0">등록 된 글이 없습니다.</div>
			<div class="pagination pagination-small">
				<ul>
					<li ng-if="pagePrev"><a ng-click="gotoPage(pagePrev)">&lt;</a></li>
					<li ng-repeat="p in pages"><span ng-if="p != currentPage"
						style="color: blue;" ng-click="gotoPage(p)">{{ p }}</span> <span
						ng-if="p == currentPage" style="font-weight: bold; color: black;">{{
							p }}</span></li>
					<li ng-if="pageNext"><a ng-click="gotoPage(pageNext)">&gt;</a></li>
				</ul>
			</div>
			<button ng-if="user.authority=='ROLE_ADMIN'" id="team_board_btn"
				class="btn btn-primary" ng-click="notice_write()"
				onclick="$('#contest_board_edit').show();$('#contest_board').hide();">글쓰기</button>

		</div>

		<!-- 자료제출 글쓰기 -->
		<div id="contest_board_edit" class="contest_all span9"
			style="display: none" ng-if="selectedLi.href!='#contest_team_board'">
			<form action="write.do" method="post" enctype="multipart/form-data"
				ng-submit="submit()">
				<input type="hidden" value="{{contest_board_id}}" name="board_id" />
				<input type="hidden"
					value="contest.html#?contest_reg_id={{contest_reg.contest_reg_id}}"
					name="page" /> <br />
				<div class="span2">중요 공지 여부</div>

				<input id="notice_ck" name="notice_ck" type="radio"
					ng-model="notice_ck" value="0" />자료제출 <input id="notice_ck"
					name="notice_ck" type="radio" ng-model="notice_ck" value="1" />공지사항
				<br /> <br />

				<div class="span2">제목</div>
				<input class="span6" name="title" id="contest_board_name"
					type="text" /> <br />
				<div class="span2">파일 첨부</div>
				<button type="button" class="btn btn-info" onclick="file_add()">파일추가</button>
				<div id="file_add"></div>
				<!--추가되는 파일 이름과 id는 contest_team_board_file-->
				<br />




				<textarea name="content" id="textarea1"
					class="span8 contest_board_content"></textarea>
				<br />
				<div class="span4 offset3">
					<a class="btn" ng-click="init();"
						onclick="$('#contest_board_edit').hide();$('#contest_board').show();oEditors.getById['textarea1'].exec('UPDATE_CONTENTS_FIELD', []);">목록으로</a>&nbsp;&nbsp;<input
						type="submit" class="btn btn-primary" value="등록">
				</div>
			</form>
		</div>

		<!-- 대회게시판 수정 -->

		<div id="contest_board_modify" class="contest_all span9"
			style="display: none" ng-if="selectedLi.href!='#contest_team_board'">
			<form action="modify.do" method="post" enctype="multipart/form-data"
				ng-submit="submit2()">
				<input type="hidden" name="content_id"
					value="{{content.content_id}}" /> <input type="hidden"
					name="board_id" value="{{content.board_id}}" /> <input
					type="hidden"
					value="contest.html#?contest_reg_id={{contest_reg.contest_reg_id}}"
					name="page" /> <br />
				<div class="span2">중요 공지 여부</div>


				<input id="notice_ck" name="notice_ck" type="radio"
					ng-model="notice" value="0" />자료제출 <input id="notice_ck"
					name="notice_ck" type="radio" ng-model="notice" value="1" />공지사항 <br />
				<br />

				<div class="span2">제목</div>
				<input class="span6" name="title" id="contest_board_name"
					ng-model="content.title" type="text" /> <br />
				<div class="span2">파일 첨부</div>
				<br /> <a ng-repeat-start="file in files"
					ng-click="download(file.file_id)">●{{file.file_name}}</a>&nbsp;&nbsp;<span
					ng-repeat-end ng-click="file_delete($index)"><a>&times;</a></span><br />
				<button type="button" class="btn btn-info" onclick="file_add()">파일추가</button>
				<div id="files_add"></div>
				<!--추가되는 파일 이름과 id는 contest_team_board_file-->
				<br />



				<textarea name="content" id="textarea2"
					class="span8 contest_board_content" ng-model="mo_textarea2"></textarea>
				<br />
				<div class="span4 offset3">
					<a class="btn"
						onclick="$('#contest_board_edit').hide();$('#contest_board').show();"
						ng-click="init();">목록으로</a>&nbsp;&nbsp;<input type="submit"
						class="btn btn-primary" value="등록">
				</div>
			</form>
		</div>
		<!--// 대회게시판 수정  -->

		<!-- 대회게시판 보기-->


		<div id="contest_board_board" class="contest_all span9"
			ng-if="selectedLi.href=='#contest_board' && content_id">
			<br />

			<div class="offset7" ng-click="list()">
				<button class="btn" ng-if="!showModify">목록으로</button>
			</div>


			<ul class="nav nav-tabs"
				ng-if="user.authority=='ROLE_ADMIN' && !showModify">
				<li ng-click="$parent.$parent.contentCheck=true;"
					ng-class="{active: $parent.$parent.contentCheck}"><a href
					ng-click="contentShow();">내용</a></li>
				<li ng-click="$parent.$parent.contentCheck=false; teamlist(); "
					ng-class="{active: !$parent.$parent.contentCheck}"><a href>{{content.notice==1
						? "첨부글" : "제출&amp;첨부글"}}</a></li>
			</ul>

			<div ng-if="!($parent.contentCheck)">
				<table class="table table-hover">
					<thead>
						<tr>
							<td>팀명</td>
							<td>주제</td>
							<td>팀원</td>
							<td>총 인원</td>
						</tr>
					</thead>
					<tbody>
						<tr ng-repeat="item in teamList" ng-click="showTeamReply2($index)">
							<td>{{item.team.team_name}}</td>
							<td>{{item.team.track_name}}</td>
							<td><span class="leader">팀장 :
									{{item.leader.name+"("+item.leader.id+")"}}</span></td>
							<td>{{item.count}}</td>
						</tr>
					</tbody>
				</table>

				<div ng-if="$parent.showReply2">
					<h2>{{selectedTeam.team_name}}팀의&nbsp;첨부글 {{content.notice==0
						? "&amp;자료": ""}}</h2>
					<div ng-if="content.notice==0">


						<span ng-repeat="item in teamfiles"><a href
							ng-click="download(item.file_id)">{{item.file_name+"("+item.fileSize+"btye)"}}</a>&nbsp;&nbsp;
							<span ng-click="fileDelete($index)"><a>&times;</a></span><br /></span>
						<br />
					</div>

					<div class="user comment " ng-repeat="item in reply2">

						<span class="name">{{item.name}}</span><span class="id">({{item.id}})</span><span
							class="date">{{item.shortdate}}</span> <span
							class="user_see right"
							ng-if="item.id==id && selectedIndex!=$index"><a
							ng-click="m_reply2($index,item.content);">수정</a>&nbsp;&nbsp; <a
							ng-click="reply2Delete($index)"
							ng-if="item.id==id && selectedIndex!=$index">삭제</a></span> <span
							class="user_see right"
							ng-if="item.id==id && selectedIndex==$index"><a
							ng-click="initReply2()">수정취소</a>&nbsp;&nbsp; <a
							ng-click=" reply2Modify($index);"
							ng-if="item.id==id && selectedIndex==$index">수정완료</a></span>

						<!--class="user_see"의 경우에는 추후 해당 id만 show 나머지 hide-->

						<div class="com_content" ng-if="selectedIndex!=$index">{{item.content}}</div>
						<div>
							<textarea style="width: 40em;" class="com_content"
								ng-model="$parent.$parent.$parent.$parent.$parent.modifyReply2content"
								ng-if="selectedIndex==$index"></textarea>
						</div>

						<hr />

					</div>

					<!--//추가된 댓글 양식-->

					<div class="comment">
						<i class="icon-bullhorn"></i>
						<textarea class="comm"
							ng-model="$parent.$parent.$parent.writeReply2content"></textarea>
						<button ng-click="reply2Write()" type="button"
							class="btn btn-primary">첨부글 등록</button>
					</div>
				</div>

			</div>


			<div class="notice_board" ng-if="$parent.contentCheck && !showModify">
				<span class="notice_define"></span><span>{{content.notice==0
					? "[자료제출]" : "[공지]"}}&nbsp;{{content.title}}</span><span class="right"><span
					class="date">{{content.dateShort}}</span> <span class="adim_see">
						<a href="#" ng-if="user.id==content.id"
						onclick="$('#contest_board_modify').show();"
						ng-click="notice_modify()">수정</a>&nbsp;&nbsp;<!-- <a href ng-if="user.id==content.id || user.authority=='ROLE_ADMIN'" ng-click="notice_delete()">삭제</a>-->
				</span></span>
				<!--class="adim_see"의 경우에는 추후 관리자만 show 나머지 hide-->
			</div>



			<div class="notice_board" ng-if="$parent.contentCheck && !showModify">
				<span class="notice_define">작성자 : </span><span>{{content.id}}</span>
				<span class="notice_define">조회수 : </span><span>{{content.hit}}</span>

				<span class="right"><a onclick="add()">첨부파일<i
						class="icon-circle-arrow-down"></i></a></span> <br />
				<!--DB에서 첨부파일 링크를 가져옴-->
				<div class="add span3" style="display: none">
					<a ng-repeat="file in files" ng-click="download(file.file_id)">●{{file.file_name}}<br /></a>
				</div>

				<div class="notice-content">
					{{content.content}}
					<!--공지사항 내용을 DB에 꺼내서 넣을 곳-->
				</div>
				<br />
				<hr
					ng-if="join && user.authority=='ROLE_STUDENT' && content.notice==0" />
				<span
					ng-if="join && user.authority=='ROLE_STUDENT' && content.notice==0">자료를
					제출하거나 제출한 파일을 볼 수 있습니다.</span>
				<div
					ng-if="join && user.authority=='ROLE_STUDENT' && content.notice==0">

					<form action="hw.do" method="post" enctype="multipart/form-data"
						ng-submit="submit()">
						<input type="hidden" name="contest_reg_id"
							value="{{contest_reg_id}}" /> <input type="hidden"
							name="team_id" value="{{team_id}}" /> <input type="hidden"
							name="content_id" value="{{content_id}}" /> <span
							ng-repeat="item in teamfiles"><a href
							ng-click="download(item.file_id)">{{item.file_name+"("+item.fileSize+"btye)"}}</a>&nbsp;&nbsp;
							<span ng-click="fileDelete($index)"><a>&times;</a></span><br /></span>
						<input ng-repeat="n in [] | range:times" type="file" name="file" />
						<br /> <a class="btn" ng-click="timesAdd()">파일추가</a>
						<button class="btn btn-primary">파일제출</button>
					</form>
				</div>

				<hr />
				<span ng-if="join && user.authority=='ROLE_STUDENT'">관리자에게
					문의사항이나 전달할 사항이 있으시면 첨부글을 남기면됩니다.<br /> (참여한 팀에 관련된 첨부글만 보입니다.)
				</span>
				<!--추가된 댓글 양식 : Angular js의 경우 여기에 for loop를 걸면 됨-->

				<div class="user comment " ng-repeat="item in reply2"
					ng-if="join && user.authority=='ROLE_STUDENT'">

					<span class="name">{{item.name}}</span><span class="id">({{item.id}})</span><span
						class="date">{{item.shortdate}}</span> <span
						class="user_see right"
						ng-if="item.id==id && selectedIndex!=$index"><a
						ng-click="m_reply2($index,item.content);">수정</a>&nbsp;&nbsp; <a
						ng-click="reply2Delete($index)"
						ng-if="item.id==id && selectedIndex!=$index">삭제</a></span> <span
						class="user_see right"
						ng-if="item.id==id && selectedIndex==$index"><a
						ng-click="initReply2()">수정취소</a>&nbsp;&nbsp; <a
						ng-click="reply2Modify($index);"
						ng-if="item.id==id && selectedIndex==$index">수정완료</a></span>


					<!--class="user_see"의 경우에는 추후 해당 id만 show 나머지 hide-->

					<div class="com_content" ng-if="selectedIndex!=$index">{{item.content}}</div>
					<div>
						<textarea style="width: 40em;" class="com_content"
							ng-model="$parent.$parent.$parent.$parent.$parent.modifyReply2content"
							ng-if="selectedIndex==$index"></textarea>
					</div>

					<hr />

				</div>

				<!--//추가된 댓글 양식-->

				<div class="comment" ng-if="join && user.authority=='ROLE_STUDENT'">
					<i class="icon-bullhorn"></i>
					<textarea class="comm"
						ng-model="$parent.$parent.$parent.writeReply2content"></textarea>
					<button ng-click="reply2Write()" type="button"
						class="btn btn-primary">첨부글 등록</button>
				</div>

			</div>

		</div>

		<!--자료제출 및 공지-->
		<!--대회 일정-->
		<div id="contest_schedule" class="contest_all span9"
			ng-if="selectedLi.href=='#contest_schedule'">
			<br /> <span class="span2">주제 : </span> <span
				ng-repeat="item in track">{{item.track_name}}<span
				ng-if="!$last">,&nbsp;</span></span><br /> <span class="span2">중복
				참여 여부 : </span> <span ng-if="contest_reg.track_check==0">주제당 학생 참여
				불가. 한 학생이 한팀으로만 참여 가능 </span> <span ng-if="contest_reg.track_check==1">주제당
				참여가능, 한학생이 여러주제참여가능</span><br /> <br /> <span class="span2">접수 신청일
				: </span>{{contest_reg.apply_start_date}}<br /> <span class="span2">접수
				마감일 : </span>{{contest_reg.apply_end_date}}<br /> <span class="span2">제출
				시작일 : </span>{{contest_reg.report_start_date}}<br /> <span class="span2">제출
				마감일 : </span>{{contest_reg.report_end_date}}<br /> <span class="span2">대회
				마감일 : </span>{{contest_reg.enddate}}<br /> <br /> <span class="span2"
				ng-repeat-start="item in schedule">{{item.schedule_name}}:</span>{{item.schedule_date}}
			<br ng-repeat-end /> <span class="span2">첨부파일 : </span><a href
				ng-click="contest_reg_fileDownload(item.file_id)"
				ng-repeat="item in contest_reg_file">{{item.file_name}}<br /></a> <span
				class="span2">내용</span><br /> <span class="span8">{{contest_reg.content}}</span>
		</div>



		<!--//대회 일정-->


		<!--팀게시판-->
		<!--팀게시판_목록-->
		<div id="contest_team_board" class="contest_all span9"
			ng-if="selectedLi.href=='#contest_team_board' && !content_id">
			<table class="table table-hover">
				<thead>
					<tr>
						<td>번호</td>
						<td>제목</td>
						<td>작성자</td>
						<td>댓글</td>
						<td></td>
						<td>날짜</td>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="item in currentPageitems"
						ng-click="team_board_board(item.content_id)">
						<td>{{item.rownum}}</td>
						<td>{{item.title}}</td>
						<td>{{item.name}}</td>
						<td>{{item.reply_count}}</td>
						<td></td>
						<td>{{item.shortdate}}</td>
					</tr>
				</tbody>
			</table>
			<div ng-if="currentPageitems.length==0">등록 된 글이 없습니다.</div>
			<div class="pagination pagination-small">
				<ul>
					<li ng-if="pagePrev"><a ng-click="gotoPage(pagePrev)">&lt;</a></li>
					<li ng-repeat="p in pages"><span ng-if="p != currentPage"
						style="color: blue;" ng-click="gotoPage(p)">{{ p }}</span> <span
						ng-if="p == currentPage" style="font-weight: bold; color: black;">{{
							p }}</span></li>
					<li ng-if="pageNext"><a ng-click="gotoPage(pageNext)">&gt;</a></li>
				</ul>
			</div>
			<button id="team_board_btn" class="btn btn-primary"
				onclick="$('#contest_team_board_edit').show();$('#contest_team_board').hide();"
				ng-click="writeShow()">글쓰기</button>
		</div>
		<!--//팀게시판_목록-->





		<!--팀게시판_글쓰기-->

		<div id="contest_team_board_edit" class="contest_all span9"
			style="display: none">
			<br />
			<form name="contest_team_board_edit" action="write.do" method="post"
				enctype="multipart/form-data" ng-submit="submit()">
				<input type="hidden" value="{{contest_board_id}}" name="board_id" />
				<input type="hidden" value="0" name="notice_ck" /> <input
					type="hidden"
					value="contest.html#?contest_reg_id={{contest_reg.contest_reg_id}}&team={{team_id}}"
					name="page" /> <input type="hidden" value="{{team_id}}"
					name="team_id" />
				<div class="span2">제목</div>
				<input class="span6" name="title" id="contest_team_board_name"
					type="text" /> <br />
				<div class="span2">파일 첨부</div>
				<button type="button" class="btn btn-info" onclick="file_add()">파일추가</button>
				<div id="file_add"></div>
				<!--추가되는 파일 이름과 id는 contest_team_board_file-->
				<br />
				<textarea name="content" id="textarea1"
					class="span8 contest_team_board_content"></textarea>
				<br />
				<div class="span4 offset3">
					<a class="btn" ng-click="init();"
						onclick="$('#contest_team_board_edit').hide();$('#contest_team_board').show();oEditors.getById['textarea1'].exec('UPDATE_CONTENTS_FIELD', []);">목록으로</a>&nbsp;&nbsp;<input
						type="submit" class="btn btn-primary" value="등록">
				</div>
			</form>
		</div>

		<!--//팀게시판_글쓰기-->

		<!-- 팀게시판 수정 -->
		<div id="contest_board_modify" class="contest_all span9"
			style="display: none" ng-if="selectedLi.href!='#contest_board_board'">
			<form action="modify.do" method="post" enctype="multipart/form-data"
				ng-submit="submit2()">
				<input type="hidden" name="content_id"
					value="{{content.content_id}}" /> <input type="hidden"
					name="board_id" value="{{content.board_id}}" /> <input
					type="hidden" name="team_id" value="{{team_id}}" /> <input
					type="hidden"
					value="contest.html#?contest_reg_id={{contest_reg.contest_reg_id}}&team={{team_id}}"
					name="page" /> <br />
				<div class="span2">제목</div>
				<input class="span6" name="title" id="contest_board_name"
					ng-model="content.title" type="text" /> <br />
				<div class="span2">파일 첨부</div>
				<br /> <a ng-repeat-start="file in files"
					ng-click="download(file.file_id)">●{{file.file_name}}</a>&nbsp;&nbsp;<span
					ng-repeat-end ng-click="file_delete($index)"><a>&times;</a></span><br />
				<button type="button" class="btn btn-info" onclick="file_add()">파일추가</button>
				<div id="files_add"></div>
				<!--추가되는 파일 이름과 id는 contest_team_board_file-->
				<br />



				<textarea name="content" id="textarea2"
					class="span8 contest_board_content" ng-model="mo_textarea2"></textarea>
				<br />
				<div class="span4 offset3">
					<a class="btn"
						onclick="$('#contest_board_edit').hide();$('#contest_board').show();"
						ng-click="init();">목록으로</a>&nbsp;&nbsp;<input type="submit"
						class="btn btn-primary" value="등록">
				</div>
			</form>
		</div>
		<!-- //팀게시판 수정 -->
		<!--팀게시판_내용-->


		<div class="span9"
			ng-if="!showModify && selectedLi.href=='#contest_team_board' && content_id">
			<br />

			<div class="offset7" ng-click="list()">
				<button class="btn" ng-if="!showModify">목록으로</button>
			</div>


			<div class="notice_board"
				ng-if="!showModify && selectedLi.href=='#contest_team_board' && content_id">
				<span class="notice_define"></span><span>&nbsp;{{content.title}}</span><span
					class="right"><span class="date">{{content.dateShort}}</span>
					<span class="adim_see"> <a href="#"
						ng-if="user.id==content.id"
						onclick="$('#contest_board_modify').show();"
						ng-click="notice_modify()">수정</a>&nbsp;&nbsp;<!-- <a href ng-if="user.id==content.id || user.authority=='ROLE_ADMIN'" ng-click="notice_delete()">삭제</a>--></span></span>
				<!--class="adim_see"의 경우에는 추후 관리자만 show 나머지 hide-->
			</div>



			<div class="notice_board"
				ng-if="!showModify && selectedLi.href=='#contest_team_board' && content_id">
				<span class="notice_define">작성자 : </span><span>{{content.id}}</span>
				<span class="notice_define">조회수 : </span><span>{{content.hit}}</span>

				<span class="right"><a onclick="add()">첨부파일<i
						class="icon-circle-arrow-down"></i></a></span> <br />
				<!--DB에서 첨부파일 링크를 가져옴-->
				<div class="add span3" style="display: none">
					<a ng-repeat="file in files" ng-click="download(file.file_id)">●{{file.file_name}}<br /></a>
				</div>

				<div class="notice-content">
					{{content.content}}
					<!--공지사항 내용을 DB에 꺼내서 넣을 곳-->
				</div>
				<br />


				<hr />

				<!--추가된 댓글 양식 : Angular js의 경우 여기에 for loop를 걸면 됨-->

				<div class="user comment " ng-repeat="item in reply2"
					ng-if="join && user.authority=='ROLE_STUDENT'">

					<span class="name">{{item.name}}</span><span class="id">({{item.id}})</span><span
						class="date">{{item.shortdate}}</span> <span
						class="user_see right"
						ng-if="item.id==id && selectedIndex!=$index"><a
						ng-click="m_reply2($index,item.content);">수정</a>&nbsp;&nbsp; <a
						ng-click="reply2Delete($index)"
						ng-if="item.id==id && selectedIndex!=$index">삭제</a></span> <span
						class="user_see right"
						ng-if="item.id==id && selectedIndex==$index"><a
						ng-click="initReply2()">수정취소</a>&nbsp;&nbsp; <a
						ng-click="reply2Modify($index);"
						ng-if="item.id==id && selectedIndex==$index">수정완료</a></span>


					<!--class="user_see"의 경우에는 추후 해당 id만 show 나머지 hide-->

					<div class="com_content" ng-if="selectedIndex!=$index">{{item.content}}</div>
					<div>
						<textarea style="width: 40em;" class="com_content"
							ng-model="$parent.$parent.$parent.$parent.$parent.modifyReply2content"
							ng-if="selectedIndex==$index"></textarea>
					</div>

					<hr />

				</div>

				<!--//추가된 댓글 양식-->

				<div class="comment" ng-if="join && user.authority=='ROLE_STUDENT'">
					<i class="icon-bullhorn"></i>
					<textarea class="comm"
						ng-model="$parent.$parent.$parent.writeReply2content"></textarea>
					<button ng-click="reply2Write()" type="button"
						class="btn btn-primary">첨부글 등록</button>
				</div>

			</div>

		</div>


		<!--//팀게시판_내용-->
		<!--//팀게시판-->

		<!--팀원 관리 및 제안서 관리-->
		<div id="contest_setting" class="contest_all span9"
			ng-if="selectedLi.href=='#contest_setting'">
			<!--경진대회 form-->
			<form class="form-horizontal" action="/testpackage/UploadProposal"
				method="post" onsubmit="return formCheck();"
				enctype="multipart/form-data">
				<!--주제 선택-->
				<div class="control-group">
					<label class="control-label" for="inputEmail">주제</label>
					<div class="controls">
						<select name="track" id="opt">
							<option id="opt">기자재 대여시스템</option>
						</select>
					</div>
				</div>
				<!--//주제 선택-->
				<!--팀명-->
				<div class="control-group">
					<label class="control-label" for="inputPassword">팀명</label>
					<div class="controls">
						<input maxlength="15" onblur="check()" id="teamName"
							onkeyup="check()" onkeydown="check()" type="text"
							name="team_name" />
					</div>
				</div>
				<!--팀명-->
				<!--제안서-->
				<div class="control-group">
					<label class="control-label"> 제안서</label>
					<div class="controls">
						<input type="file" name="file">
					</div>
				</div>
				<!--제안서-->
				<!--팀원선택 및 dialog실행-->
				<div class="control-group">
					<label class="control-label"> 팀원선택</label>
					<div class="controls">
						<a id="team_change" ng-click="modalShow()" class="btn">팀원 변경</a>
					</div>
					<br />
				</div>
				<!--팀원선택-->
				<!--선택된 사람-->
				<table class="check table table-condensed">
					<thead class="check">
						<tr>
							<td>팀장</td>
							<td>학과</td>
							<td>이름</td>
							<td>학번</td>
						</tr>
					</thead>
					<tbody class="check">
						<tr class="check">
							<td><input type="hidden" name="chk_in" class="ch"><input
								type="radio" name="chk_info" checked="checked" class="chk"></td>
							<td>getName()</td>
							<td>getName()</td>
							<td>getId()</td>
						</tr>
					</tbody>
				</table>
				<!--선택된 사람-->
				<input id="leader" type="hidden" name="leader"> <br /> <input
					class="btn btn-primary save1" name="cmd" type="submit" value="저장하기"
					disabled />
			</form>
			<!--경진대회 form-->
		</div>
		<!--대화상자-->
		<div id="우편번호대화상자" class="modal hide fade"
			style="max-height: 45em; height: 45em;" data-backdrop="static"
			data-keyboard="false" tabindex="-1"
			ng-if="selectedLi.href=='#contest_setting'">
			<div class="modal-header">
				<a class="team_change_ok close no" data-dismiss="modal"
					ng-click="modalShow()">&times;</a>
				<h2>팀원 검색</h2>
			</div>
			<div class="modal-body" style="max-height: 40em;">
				<h5>현재팀원</h5>
				<div id="현재팀원">

					<div id="현재팀원_박스">
						<table class="select table table-condensed">
							<thead class="select">
								<tr>
									<th>학과</th>
									<th>이름</th>
									<th>학번</th>
									<th>취소</th>
								</tr>
							</thead>
							<tbody id="select">
								<tr id="me">
									<td>getName()</td>
									<td>member.getName()</td>
									<td>getId()</td>
									<td>본인</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>

				<h5 style="color: red">선택한 대회와 주제에 참여가능한 사람만 검색됩니다.</h5>
				<div class="form-horizontal">
					<select id="검색">
						<option value="이름">이름</option>
						<option value="학번">학번</option>
					</select> <input id="검색" type="text" class="search-query" />
					<button class="btn search">검색</button>
				</div>
				<!--로딩-->
				<div style="display: none; margin-left: 13em; position: absolute;"
					id="viewLoading">
					<img src="../res/img/ajax-loader.gif" width="100" height="80">
				</div>
				<!--//로딩-->

				<div id="우편번호대화상자_검색결과_박스" style="height: 15em;">
					<table class="search table table-condensed">
						<thead class="search">
							<tr>
								<th>학과</th>
								<th>이름</th>
								<th>학번</th>
								<th>선택</th>
							</tr>
						</thead>
						<tbody id="search" style="height: 12em;">
							<!-- 이부분이 ajax -->
						</tbody>
					</table>
				</div>
			</div>
			<div class="modal-footer" style="display: block;">
				<a class="team_change_ok no btn" data-dismiss="modal"
					ng-click="modalShow()">취소</a> <a
					class="team_change_ok ok btn btn-primary" data-dismiss="modal">확인</a>
			</div>
			<!--//대화상자-->
		</div>
		<!--//팀원 관리 및 제안서 관리-->
		<!--참가팀 목록-->
		<div id="contest_list" class="contest_all span9"
			ng-if="selectedLi.href=='#contest_list'">
			<table class="table table-hover">
				<thead>
					<tr>
						<td>팀명</td>
						<td>주제</td>
						<td>팀원</td>
						<td>총 인원</td>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="item in teamList">
						<td>{{item.team.team_name}}</td>
						<td>{{item.team.track_name}}</td>
						<td><span class="leader">팀장 :
								{{item.leader.name+"("+item.leader.id+")"}}</span> <br />팀원 : <span
							ng-repeat="member in item.user"><span ng-if="!$first">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							</span>{{member.name+"("+member.id+")"}}<br /></span></td>
						<td>{{item.count}}</td>
					</tr>
				</tbody>
			</table>
		</div>
		<!--//참가팀 목록-->
		<!--대회 시상 및 시상 결과-->
		<div id="contest_score" class="contest_all span9"
			ng-if="selectedLi.href=='#contest_score'">
			<div>
				대회시상 정보입니다.<br>
				<br>
			</div>

			<!-- 대회 마감 후, 모든 회원 -->
			<div ng-if="contest_reg.finish == 1">
				<table class="table table-hover">
					<thead>
						<tr>
							<td>등수</td>
							<td>상이름</td>
							<td>팀명</td>
							<td>주제</td>
							<td>팀원</td>
							<td>작품보기</td>
						</tr>
					</thead>
					<tbody>
					<tr>
						<td>1</td>
						<td>최우수</td>
						<td>하이김</td>
						<td>성공회대학교 IT경진대회</td>
						<td><span class="leader">팀장 : 주창석(200932038),</span> <br />김수빈(201132007),
							이한주(201132028),<br /> 진현주(201132037), 하유리(201132041)</td>
						<td><a href="">link</a></td>
						</tr>
					</tbody>
				</table>
			</div>

			<!-- 대회 마감 전, 관리자 -->
			<div
				ng-if="contest_reg.finish == 0 && user.authority == 'ROLE_ADMIN'">
				<div>
				list.teamList.team<br>
				list.teamList.team.team_name<br>
				list.teamList.team_name<br>
				</div>
				<table class="table table-hover">
					<thead>
						<tr>

							<td>팀명</td>
							<td>주제</td>
							<td>팀원</td>
							<td>작품보기</td>
							<td>등수</td>
							<td>상이름</td>
						</tr>
					</thead>
					<tbody>
						<tr ng-repeat="item in teamList">
							<td>{{item.team.team_name}}</td>
							<td>{{item.team.track_name}}</td>
							<td><span class="leader">팀장 :
									{{item.leader.name+"("+item.leader.id+")"}}</span> <br />팀원 : <span
								ng-repeat="member in item.user"><span ng-if="!$first">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								</span>{{member.name+"("+member.id+")"}}<br /></span></td>
							<td>{{item.count}}</td>
						</tr>
						<tr>

							<td>하이김</td>
							<td>성공회대학교 IT경진대회</td>
							<td><span class="leader">팀장 : 주창석(200932038),</span> <br />김수빈(201132007),
								이한주(201132028),<br /> 진현주(201132037), 하유리(201132041)</td>
							<td><a href="">link</a></td>
							<td>등수는 select바긋로 하고싶은딩..</td>
							<td>상이름은 등수에따라 정해저야지..</td>
						</tr>
					</tbody>
				</table>
				<br>
			</div>

			<!-- 대회 마감 전, 비회원/참가학생/비참가학생 -->
			<div
				ng-if="contest_reg.finish == 0 && user.authority != 'ROLE_ADMIN'"
				style="text-align: center">
				<br> <br> <br> <br> <br> <br> <br>현재,
				대회 시상중입니다.<br> <br> <br> <br> <br> <br>
				<br>
			</div>
		</div>
		<!--//대회 시상 및 시상 결과-->


		<!-- 필수 산출물관리 -->
		<div id="contest_report" class="contest_all span9"
			ng-if="selectedLi.href=='#contest_report'">
			<h3>마지막에 꼭 내야 할필수 산출물을 관리합니다.</h3>

			<table class="table-condensed table" style="width: 30em;">
				<thead>
					<tr>
						<td>산출물이름</td>
						<td></td>
						<td></td>
					</tr>
				</thead>

				<tbody>
					<tr ng-repeat="item in reportList">
						<td><span ng-if="r_modify!=$index">{{item.regdata_name}}</span>
							<input type="text" style="maxlength: 10em; width: 10em;"
							ng-if="r_modify==$index"
							ng-model="$parent.$parent.$parent.r_value" /></td>
						<td>
							<button class="btn" name="cmd" id="cancle"
								ng-if="r_modify==$index" ng-click="reportModify($index)">취소</button>
							<button class="btn" name="cmd" value="수정" id="suc"
								ng-if="r_modify==$index" ng-click="r_complete($index)">완료</button>
							<button class="btn" name="cmd" id="수정"
								ng-click="reportModify($index)" ng-if="r_modify!=$index">수정</button>
							<button id="삭제" class="btn" name="cmd" value="삭제"
								ng-if="r_modify!=$index" ng-click="r_delete($index)">삭제</button>
						</td>
					</tr>
				</tbody>
			</table>

			<input type="text" ng-model="$parent.regdata" />
			<button class="btn" ng-click="r_add()">추가</button>

		</div>
		<!--//contest all-->
		<!--footer-->

		<div class="footer span12"></div>
		<!--//footer-->
	</div>
</body>
</html>